home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 2003 August / MW 8 2003 CD1.iso / Inside Macworld / Product News / gimp-1.2.4.sit / gimp-1.2.4 / devel-docs / libgimp / sgml / gimpprotocol.sgml < prev    next >
Encoding:
Text File  |  2003-05-20  |  16.9 KB  |  486 lines

  1. <refentry id="libgimp-gimpprotocol" revision="19 Jan 2001">
  2. <refmeta>
  3. <refentrytitle>gimpprotocol</refentrytitle>
  4. <manvolnum>3</manvolnum>
  5. <refmiscinfo>LIBGIMP Library</refmiscinfo>
  6. </refmeta>
  7.  
  8. <refnamediv>
  9. <refname>gimpprotocol</refname><refpurpose>The communication protocol between GIMP and it's plug-ins.</refpurpose>
  10. </refnamediv>
  11.  
  12. <refsynopsisdiv><title>Synopsis</title>
  13. <synopsis>
  14.  
  15.  
  16.  
  17. #define     <link linkend="GP-VERSION-CAPS">GP_VERSION</link>
  18. struct      <link linkend="GPConfig">GPConfig</link>;
  19. struct      <link linkend="GPTileReq">GPTileReq</link>;
  20. struct      <link linkend="GPTileAck">GPTileAck</link>;
  21. struct      <link linkend="GPTileData">GPTileData</link>;
  22. struct      <link linkend="GPParam">GPParam</link>;
  23. struct      <link linkend="GPParamDef">GPParamDef</link>;
  24. struct      <link linkend="GPProcRun">GPProcRun</link>;
  25. struct      <link linkend="GPProcReturn">GPProcReturn</link>;
  26. struct      <link linkend="GPProcInstall">GPProcInstall</link>;
  27. struct      <link linkend="GPProcUninstall">GPProcUninstall</link>;
  28. void        <link linkend="gp-init">gp_init</link>                         (void);
  29. <link linkend="gboolean">gboolean</link>    <link linkend="gp-quit-write">gp_quit_write</link>                   (<link linkend="GIOChannel">GIOChannel</link> *channel);
  30. <link linkend="gboolean">gboolean</link>    <link linkend="gp-config-write">gp_config_write</link>                 (<link linkend="GIOChannel">GIOChannel</link> *channel,
  31.                                              <link linkend="GPConfig">GPConfig</link> *config);
  32. <link linkend="gboolean">gboolean</link>    <link linkend="gp-tile-req-write">gp_tile_req_write</link>               (<link linkend="GIOChannel">GIOChannel</link> *channel,
  33.                                              <link linkend="GPTileReq">GPTileReq</link> *tile_req);
  34. <link linkend="gboolean">gboolean</link>    <link linkend="gp-tile-ack-write">gp_tile_ack_write</link>               (<link linkend="GIOChannel">GIOChannel</link> *channel);
  35. <link linkend="gboolean">gboolean</link>    <link linkend="gp-tile-data-write">gp_tile_data_write</link>              (<link linkend="GIOChannel">GIOChannel</link> *channel,
  36.                                              <link linkend="GPTileData">GPTileData</link> *tile_data);
  37. <link linkend="gboolean">gboolean</link>    <link linkend="gp-proc-run-write">gp_proc_run_write</link>               (<link linkend="GIOChannel">GIOChannel</link> *channel,
  38.                                              <link linkend="GPProcRun">GPProcRun</link> *proc_run);
  39. <link linkend="gboolean">gboolean</link>    <link linkend="gp-proc-return-write">gp_proc_return_write</link>            (<link linkend="GIOChannel">GIOChannel</link> *channel,
  40.                                              <link linkend="GPProcReturn">GPProcReturn</link> *proc_return);
  41. <link linkend="gboolean">gboolean</link>    <link linkend="gp-temp-proc-run-write">gp_temp_proc_run_write</link>          (<link linkend="GIOChannel">GIOChannel</link> *channel,
  42.                                              <link linkend="GPProcRun">GPProcRun</link> *proc_run);
  43. <link linkend="gboolean">gboolean</link>    <link linkend="gp-temp-proc-return-write">gp_temp_proc_return_write</link>       (<link linkend="GIOChannel">GIOChannel</link> *channel,
  44.                                              <link linkend="GPProcReturn">GPProcReturn</link> *proc_return);
  45. <link linkend="gboolean">gboolean</link>    <link linkend="gp-proc-install-write">gp_proc_install_write</link>           (<link linkend="GIOChannel">GIOChannel</link> *channel,
  46.                                              <link linkend="GPProcInstall">GPProcInstall</link> *proc_install);
  47. <link linkend="gboolean">gboolean</link>    <link linkend="gp-proc-uninstall-write">gp_proc_uninstall_write</link>         (<link linkend="GIOChannel">GIOChannel</link> *channel,
  48.                                              <link linkend="GPProcUninstall">GPProcUninstall</link> *proc_uninstall);
  49. <link linkend="gboolean">gboolean</link>    <link linkend="gp-extension-ack-write">gp_extension_ack_write</link>          (<link linkend="GIOChannel">GIOChannel</link> *channel);
  50. </synopsis>
  51. </refsynopsisdiv>
  52.  
  53.  
  54.  
  55.  
  56.  
  57. <refsect1>
  58. <title>Description</title>
  59. <para>
  60. The communication protocol between GIMP and it's plug-ins.
  61.  
  62. </para>
  63. </refsect1>
  64.  
  65. <refsect1>
  66. <title>Details</title>
  67. <refsect2>
  68. <title><anchor id="GP-VERSION-CAPS">GP_VERSION</title>
  69. <programlisting>#define GP_VERSION 0x0004
  70. </programlisting>
  71. <para>
  72.  
  73. </para></refsect2>
  74. <refsect2>
  75. <title><anchor id="GPConfig">struct GPConfig</title>
  76. <programlisting>struct GPConfig
  77. {
  78.   guint32 version;
  79.   guint32 tile_width;
  80.   guint32 tile_height;
  81.   gint32  shm_ID;
  82.   gdouble gamma;
  83.   gint8   install_cmap;
  84.   gint8   use_xshm;
  85.   gint32  min_colors;
  86.   gint32  gdisp_ID;
  87. };
  88. </programlisting>
  89. <para>
  90.  
  91. </para></refsect2>
  92. <refsect2>
  93. <title><anchor id="GPTileReq">struct GPTileReq</title>
  94. <programlisting>struct GPTileReq
  95. {
  96.   gint32  drawable_ID;
  97.   guint32 tile_num;
  98.   guint32 shadow;
  99. };
  100. </programlisting>
  101. <para>
  102.  
  103. </para></refsect2>
  104. <refsect2>
  105. <title><anchor id="GPTileAck">struct GPTileAck</title>
  106. <programlisting>struct GPTileAck;</programlisting>
  107. <para>
  108.  
  109. </para></refsect2>
  110. <refsect2>
  111. <title><anchor id="GPTileData">struct GPTileData</title>
  112. <programlisting>struct GPTileData
  113. {
  114.   gint32   drawable_ID;
  115.   guint32  tile_num;
  116.   guint32  shadow;
  117.   guint32  bpp;
  118.   guint32  width;
  119.   guint32  height;
  120.   guint32  use_shm;
  121.   guchar  *data;
  122. };
  123. </programlisting>
  124. <para>
  125.  
  126. </para></refsect2>
  127. <refsect2>
  128. <title><anchor id="GPParam">struct GPParam</title>
  129. <programlisting>struct GPParam
  130. {
  131.   guint32 type;
  132.  
  133.   union
  134.   {
  135.     gint32    d_int32;
  136.     gint16    d_int16;
  137.     gint8     d_int8;
  138.     gdouble   d_float;
  139.     gchar    *d_string;
  140.     gint32   *d_int32array;
  141.     gint16   *d_int16array;
  142.     gint8    *d_int8array;
  143.     gdouble  *d_floatarray;
  144.     gchar   **d_stringarray;
  145.     struct
  146.     {
  147.       guint8 red;
  148.       guint8 green;
  149.       guint8 blue;
  150.     } d_color;
  151.     struct
  152.     {
  153.       gint32 x;
  154.       gint32 y;
  155.       gint32 width;
  156.       gint32 height;
  157.     } d_region;
  158.     gint32 d_display;
  159.     gint32 d_image;
  160.     gint32 d_layer;
  161.     gint32 d_channel;
  162.     gint32 d_drawable;
  163.     gint32 d_selection;
  164.     gint32 d_boundary;
  165.     gint32 d_path;
  166.     struct
  167.     {
  168.       gchar    *name;
  169.       guint32   flags;
  170.       guint32   size;
  171.       gpointer  data;
  172.     } d_parasite;
  173.     gint32 d_status;
  174.   } data;
  175. };
  176. </programlisting>
  177. <para>
  178.  
  179. </para></refsect2>
  180. <refsect2>
  181. <title><anchor id="GPParamDef">struct GPParamDef</title>
  182. <programlisting>struct GPParamDef
  183. {
  184.   guint32  type;
  185.   gchar   *name;
  186.   gchar   *description;
  187. };
  188. </programlisting>
  189. <para>
  190.  
  191. </para></refsect2>
  192. <refsect2>
  193. <title><anchor id="GPProcRun">struct GPProcRun</title>
  194. <programlisting>struct GPProcRun
  195. {
  196.   gchar   *name;
  197.   guint32  nparams;
  198.   GPParam *params;
  199. };
  200. </programlisting>
  201. <para>
  202.  
  203. </para></refsect2>
  204. <refsect2>
  205. <title><anchor id="GPProcReturn">struct GPProcReturn</title>
  206. <programlisting>struct GPProcReturn
  207. {
  208.   gchar   *name;
  209.   guint32  nparams;
  210.   GPParam *params;
  211. };
  212. </programlisting>
  213. <para>
  214.  
  215. </para></refsect2>
  216. <refsect2>
  217. <title><anchor id="GPProcInstall">struct GPProcInstall</title>
  218. <programlisting>struct GPProcInstall
  219. {
  220.   gchar      *name;
  221.   gchar      *blurb;
  222.   gchar      *help;
  223.   gchar      *author;
  224.   gchar      *copyright;
  225.   gchar      *date;
  226.   gchar      *menu_path;
  227.   gchar      *image_types;
  228.   guint32     type;
  229.   guint32     nparams;
  230.   guint32     nreturn_vals;
  231.   GPParamDef *params;
  232.   GPParamDef *return_vals;
  233. };
  234. </programlisting>
  235. <para>
  236.  
  237. </para></refsect2>
  238. <refsect2>
  239. <title><anchor id="GPProcUninstall">struct GPProcUninstall</title>
  240. <programlisting>struct GPProcUninstall
  241. {
  242.   gchar *name;
  243. };
  244. </programlisting>
  245. <para>
  246.  
  247. </para></refsect2>
  248. <refsect2>
  249. <title><anchor id="gp-init">gp_init ()</title>
  250. <programlisting>void        gp_init                         (void);</programlisting>
  251. <para>
  252.  
  253. </para></refsect2>
  254. <refsect2>
  255. <title><anchor id="gp-quit-write">gp_quit_write ()</title>
  256. <programlisting><link linkend="gboolean">gboolean</link>    gp_quit_write                   (<link linkend="GIOChannel">GIOChannel</link> *channel);</programlisting>
  257. <para>
  258.  
  259. </para><informaltable pgwide=1 frame="none" role="params">
  260. <tgroup cols="2">
  261. <colspec colwidth="2*">
  262. <colspec colwidth="8*">
  263. <tbody>
  264. <row><entry align="right"><parameter>channel</parameter> :</entry>
  265. <entry></entry></row>
  266. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>
  267.  
  268. </entry></row>
  269. </tbody></tgroup></informaltable></refsect2>
  270. <refsect2>
  271. <title><anchor id="gp-config-write">gp_config_write ()</title>
  272. <programlisting><link linkend="gboolean">gboolean</link>    gp_config_write                 (<link linkend="GIOChannel">GIOChannel</link> *channel,
  273.                                              <link linkend="GPConfig">GPConfig</link> *config);</programlisting>
  274. <para>
  275.  
  276. </para><informaltable pgwide=1 frame="none" role="params">
  277. <tgroup cols="2">
  278. <colspec colwidth="2*">
  279. <colspec colwidth="8*">
  280. <tbody>
  281. <row><entry align="right"><parameter>channel</parameter> :</entry>
  282. <entry></entry></row>
  283. <row><entry align="right"><parameter>config</parameter> :</entry>
  284. <entry></entry></row>
  285. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>
  286.  
  287. </entry></row>
  288. </tbody></tgroup></informaltable></refsect2>
  289. <refsect2>
  290. <title><anchor id="gp-tile-req-write">gp_tile_req_write ()</title>
  291. <programlisting><link linkend="gboolean">gboolean</link>    gp_tile_req_write               (<link linkend="GIOChannel">GIOChannel</link> *channel,
  292.                                              <link linkend="GPTileReq">GPTileReq</link> *tile_req);</programlisting>
  293. <para>
  294.  
  295. </para><informaltable pgwide=1 frame="none" role="params">
  296. <tgroup cols="2">
  297. <colspec colwidth="2*">
  298. <colspec colwidth="8*">
  299. <tbody>
  300. <row><entry align="right"><parameter>channel</parameter> :</entry>
  301. <entry></entry></row>
  302. <row><entry align="right"><parameter>tile_req</parameter> :</entry>
  303. <entry></entry></row>
  304. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>
  305.  
  306. </entry></row>
  307. </tbody></tgroup></informaltable></refsect2>
  308. <refsect2>
  309. <title><anchor id="gp-tile-ack-write">gp_tile_ack_write ()</title>
  310. <programlisting><link linkend="gboolean">gboolean</link>    gp_tile_ack_write               (<link linkend="GIOChannel">GIOChannel</link> *channel);</programlisting>
  311. <para>
  312.  
  313. </para><informaltable pgwide=1 frame="none" role="params">
  314. <tgroup cols="2">
  315. <colspec colwidth="2*">
  316. <colspec colwidth="8*">
  317. <tbody>
  318. <row><entry align="right"><parameter>channel</parameter> :</entry>
  319. <entry></entry></row>
  320. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>
  321.  
  322. </entry></row>
  323. </tbody></tgroup></informaltable></refsect2>
  324. <refsect2>
  325. <title><anchor id="gp-tile-data-write">gp_tile_data_write ()</title>
  326. <programlisting><link linkend="gboolean">gboolean</link>    gp_tile_data_write              (<link linkend="GIOChannel">GIOChannel</link> *channel,
  327.                                              <link linkend="GPTileData">GPTileData</link> *tile_data);</programlisting>
  328. <para>
  329.  
  330. </para><informaltable pgwide=1 frame="none" role="params">
  331. <tgroup cols="2">
  332. <colspec colwidth="2*">
  333. <colspec colwidth="8*">
  334. <tbody>
  335. <row><entry align="right"><parameter>channel</parameter> :</entry>
  336. <entry></entry></row>
  337. <row><entry align="right"><parameter>tile_data</parameter> :</entry>
  338. <entry></entry></row>
  339. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>
  340.  
  341. </entry></row>
  342. </tbody></tgroup></informaltable></refsect2>
  343. <refsect2>
  344. <title><anchor id="gp-proc-run-write">gp_proc_run_write ()</title>
  345. <programlisting><link linkend="gboolean">gboolean</link>    gp_proc_run_write               (<link linkend="GIOChannel">GIOChannel</link> *channel,
  346.                                              <link linkend="GPProcRun">GPProcRun</link> *proc_run);</programlisting>
  347. <para>
  348.  
  349. </para><informaltable pgwide=1 frame="none" role="params">
  350. <tgroup cols="2">
  351. <colspec colwidth="2*">
  352. <colspec colwidth="8*">
  353. <tbody>
  354. <row><entry align="right"><parameter>channel</parameter> :</entry>
  355. <entry></entry></row>
  356. <row><entry align="right"><parameter>proc_run</parameter> :</entry>
  357. <entry></entry></row>
  358. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>
  359.  
  360. </entry></row>
  361. </tbody></tgroup></informaltable></refsect2>
  362. <refsect2>
  363. <title><anchor id="gp-proc-return-write">gp_proc_return_write ()</title>
  364. <programlisting><link linkend="gboolean">gboolean</link>    gp_proc_return_write            (<link linkend="GIOChannel">GIOChannel</link> *channel,
  365.                                              <link linkend="GPProcReturn">GPProcReturn</link> *proc_return);</programlisting>
  366. <para>
  367.  
  368. </para><informaltable pgwide=1 frame="none" role="params">
  369. <tgroup cols="2">
  370. <colspec colwidth="2*">
  371. <colspec colwidth="8*">
  372. <tbody>
  373. <row><entry align="right"><parameter>channel</parameter> :</entry>
  374. <entry></entry></row>
  375. <row><entry align="right"><parameter>proc_return</parameter> :</entry>
  376. <entry></entry></row>
  377. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>
  378.  
  379. </entry></row>
  380. </tbody></tgroup></informaltable></refsect2>
  381. <refsect2>
  382. <title><anchor id="gp-temp-proc-run-write">gp_temp_proc_run_write ()</title>
  383. <programlisting><link linkend="gboolean">gboolean</link>    gp_temp_proc_run_write          (<link linkend="GIOChannel">GIOChannel</link> *channel,
  384.                                              <link linkend="GPProcRun">GPProcRun</link> *proc_run);</programlisting>
  385. <para>
  386.  
  387. </para><informaltable pgwide=1 frame="none" role="params">
  388. <tgroup cols="2">
  389. <colspec colwidth="2*">
  390. <colspec colwidth="8*">
  391. <tbody>
  392. <row><entry align="right"><parameter>channel</parameter> :</entry>
  393. <entry></entry></row>
  394. <row><entry align="right"><parameter>proc_run</parameter> :</entry>
  395. <entry></entry></row>
  396. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>
  397.  
  398. </entry></row>
  399. </tbody></tgroup></informaltable></refsect2>
  400. <refsect2>
  401. <title><anchor id="gp-temp-proc-return-write">gp_temp_proc_return_write ()</title>
  402. <programlisting><link linkend="gboolean">gboolean</link>    gp_temp_proc_return_write       (<link linkend="GIOChannel">GIOChannel</link> *channel,
  403.                                              <link linkend="GPProcReturn">GPProcReturn</link> *proc_return);</programlisting>
  404. <para>
  405.  
  406. </para><informaltable pgwide=1 frame="none" role="params">
  407. <tgroup cols="2">
  408. <colspec colwidth="2*">
  409. <colspec colwidth="8*">
  410. <tbody>
  411. <row><entry align="right"><parameter>channel</parameter> :</entry>
  412. <entry></entry></row>
  413. <row><entry align="right"><parameter>proc_return</parameter> :</entry>
  414. <entry></entry></row>
  415. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>
  416.  
  417. </entry></row>
  418. </tbody></tgroup></informaltable></refsect2>
  419. <refsect2>
  420. <title><anchor id="gp-proc-install-write">gp_proc_install_write ()</title>
  421. <programlisting><link linkend="gboolean">gboolean</link>    gp_proc_install_write           (<link linkend="GIOChannel">GIOChannel</link> *channel,
  422.                                              <link linkend="GPProcInstall">GPProcInstall</link> *proc_install);</programlisting>
  423. <para>
  424.  
  425. </para><informaltable pgwide=1 frame="none" role="params">
  426. <tgroup cols="2">
  427. <colspec colwidth="2*">
  428. <colspec colwidth="8*">
  429. <tbody>
  430. <row><entry align="right"><parameter>channel</parameter> :</entry>
  431. <entry></entry></row>
  432. <row><entry align="right"><parameter>proc_install</parameter> :</entry>
  433. <entry></entry></row>
  434. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>
  435.  
  436. </entry></row>
  437. </tbody></tgroup></informaltable></refsect2>
  438. <refsect2>
  439. <title><anchor id="gp-proc-uninstall-write">gp_proc_uninstall_write ()</title>
  440. <programlisting><link linkend="gboolean">gboolean</link>    gp_proc_uninstall_write         (<link linkend="GIOChannel">GIOChannel</link> *channel,
  441.                                              <link linkend="GPProcUninstall">GPProcUninstall</link> *proc_uninstall);</programlisting>
  442. <para>
  443.  
  444. </para><informaltable pgwide=1 frame="none" role="params">
  445. <tgroup cols="2">
  446. <colspec colwidth="2*">
  447. <colspec colwidth="8*">
  448. <tbody>
  449. <row><entry align="right"><parameter>channel</parameter> :</entry>
  450. <entry></entry></row>
  451. <row><entry align="right"><parameter>proc_uninstall</parameter> :</entry>
  452. <entry></entry></row>
  453. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>
  454.  
  455. </entry></row>
  456. </tbody></tgroup></informaltable></refsect2>
  457. <refsect2>
  458. <title><anchor id="gp-extension-ack-write">gp_extension_ack_write ()</title>
  459. <programlisting><link linkend="gboolean">gboolean</link>    gp_extension_ack_write          (<link linkend="GIOChannel">GIOChannel</link> *channel);</programlisting>
  460. <para>
  461.  
  462. </para><informaltable pgwide=1 frame="none" role="params">
  463. <tgroup cols="2">
  464. <colspec colwidth="2*">
  465. <colspec colwidth="8*">
  466. <tbody>
  467. <row><entry align="right"><parameter>channel</parameter> :</entry>
  468. <entry></entry></row>
  469. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>
  470.  
  471. </entry></row>
  472. </tbody></tgroup></informaltable></refsect2>
  473.  
  474. </refsect1>
  475.  
  476.  
  477.  
  478. <refsect1>
  479. <title>See Also</title>
  480. <para>
  481. <link linkend="libgimp-gimpwire">libgimp-gimpwire</link>
  482. </para>
  483. </refsect1>
  484.  
  485. </refentry>
  486.